
<%@page import="java.util.List"%>
<%@page import="com.itwill.ecom.product.ProductBeans"%>
<%@page import="com.itwill.ecom.product.ProductService"%>
<%@page import="com.itwill.ecom.cart.CartBeans"%>
<%@page import="com.itwill.ecom.cart.CartService"%>
<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%>
<%@page import="org.springframework.web.context.WebApplicationContext"%>
<%@ page language="java" contentType="text/plain; charset=UTF-8" pageEncoding="UTF-8"%>

<%
WebApplicationContext webApplicationContext = WebApplicationContextUtils.getWebApplicationContext(application);
CartService cartService = (CartService)webApplicationContext.getBean("cartService");
ProductService productService = (ProductService)webApplicationContext.getBean("productService");
int cart_no=Integer.parseInt(request.getParameter("cart_no").trim()); 
int cart_count=Integer.parseInt(request.getParameter("cart_count").trim());

cartService.updateCart(new CartBeans(cart_no,1,1,cart_count));
CartBeans cartBean=cartService.getCart(cart_no);
ProductBeans productBean=productService.getProductByNo(cartBean.getCart_product());
List<CartBeans> list=cartService.getCartListByMemberNo(cartBean.getCart_member());
%>

<cart>
		<cart_no><%=cartBean.getCart_no()%></cart_no>
		<cart_count><%=cartBean.getCart_count()%></cart_count>
		<product_price><%=productBean.getProduct_price()%></product_price>
		<total><%=cartBean.getCart_count()*productBean.getProduct_price()%></total>
</cart>

